Jasonette/JASONETTE-iOS

View on GitHub

Showing 403 of 403 total issues

Function addListener has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

EventEmitter.prototype.addListener = function(type, listener) {
  var m;

  if (!isFunction(listener))
    throw TypeError('listener must be a function');
Severity: Minor
Found in app/Jasonette/rss.js - About 1 hr to fix

Function ReadableState has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function ReadableState(options, stream) {
  Duplex = Duplex || require('./_stream_duplex');

  options = options || {};

Severity: Minor
Found in app/Jasonette/rss.js - About 1 hr to fix

Function removeListener has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

EventEmitter.prototype.removeListener = function(type, listener) {
  var list, position, length, i;

  if (!isFunction(listener))
    throw TypeError('listener must be a function');
Severity: Minor
Found in app/Jasonette/rss.js - About 1 hr to fix

Function 40 has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"_process":27}],40:[function(require,module,exports){
(function (global){

/**
 * Module exports.
Severity: Minor
Found in app/Jasonette/rss.js - About 1 hr to fix

Function reresolve has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function reresolve (node, baseurl) {
  if (!node || !baseurl) {
    return false; // Nothing to do.
  }

Severity: Minor
Found in app/Jasonette/rss.js - About 1 hr to fix

Identical blocks of code found in 2 locations. Consider refactoring.
Open

function onwriteDrain(stream, state) {
  if (state.length === 0 && state.needDrain) {
    state.needDrain = false;
    stream.emit('drain');
  }
Severity: Major
Found in app/Jasonette/rss.js and 1 other location - About 1 hr to fix
app/Jasonette/rss.js on lines 3086..3091

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 61.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

function onwriteDrain(stream, state) {
  if (state.length === 0 && state.needDrain) {
    state.needDrain = false;
    stream.emit('drain');
  }
Severity: Major
Found in app/Jasonette/rss.js and 1 other location - About 1 hr to fix
app/Jasonette/rss.js on lines 9714..9719

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 61.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function handleAttributes has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

FeedParser.prototype.handleAttributes = function handleAttributes (attrs, el) {
  /*
   * Using the sax.js option { xmlns: true }
   * attrs is an array of objects (not strings) having the following properties
   * name - e.g., xmlns:dc or href
Severity: Minor
Found in app/Jasonette/rss.js - About 1 hr to fix

Function readableAddChunk has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function readableAddChunk(stream, state, chunk, encoding, addToFront) {
  var er = chunkInvalid(state, chunk);
  if (er) {
    stream.emit('error', er);
  } else if (chunk === null || chunk === undefined) {
Severity: Minor
Found in app/Jasonette/rss.js - About 1 hr to fix

Function indexOf has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Buffer.prototype.indexOf = function indexOf (val, byteOffset) {
  if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff
  else if (byteOffset < -0x80000000) byteOffset = -0x80000000
  byteOffset >>= 0

Severity: Minor
Found in app/Jasonette/rss.js - About 1 hr to fix

Function slowToString has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function slowToString (encoding, start, end) {
  var loweredCase = false

  start = start | 0
  end = end === undefined || end === Infinity ? this.length : end | 0
Severity: Minor
Found in app/Jasonette/rss.js - About 1 hr to fix

Function WritableState has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function WritableState(options, stream) {
  Duplex = Duplex || require('./_stream_duplex');

  options = options || {};

Severity: Minor
Found in app/Jasonette/rss.js - About 1 hr to fix

Function 2 has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"./utils":16,"addressparser":3,"array-indexofobject":4,"readable-stream":14,"sax":15,"util":50}],2:[function(require,module,exports){
/*
 * Default namespaces
 *
 * Lookup by URI
Severity: Minor
Found in app/Jasonette/rss.js - About 1 hr to fix

Function select has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    select: function(obj, filter, serialized) {
      // iterate '$selected'
      //
      /*
      SELECT.$selected = [{
Severity: Minor
Found in app/Jasonette/st.js - About 1 hr to fix

Function ReadableState has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function ReadableState(options, stream) {
  options = options || {};

  // the point at which it stops calling _read() to fill the buffer
  // Note: 0 is a valid value, means "don't call _read preemptively ever"
Severity: Minor
Found in app/Jasonette/rss.js - About 1 hr to fix

Similar blocks of code found in 2 locations. Consider refactoring.
Open

function writeFloat (buf, value, offset, littleEndian, noAssert) {
  if (!noAssert) {
    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
  }
  ieee754.write(buf, value, offset, littleEndian, 23, 4)
Severity: Major
Found in app/Jasonette/rss.js and 1 other location - About 1 hr to fix
app/Jasonette/rss.js on lines 6442..6448

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 59.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

function writeDouble (buf, value, offset, littleEndian, noAssert) {
  if (!noAssert) {
    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
  }
  ieee754.write(buf, value, offset, littleEndian, 52, 8)
Severity: Major
Found in app/Jasonette/rss.js and 1 other location - About 1 hr to fix
app/Jasonette/rss.js on lines 6426..6432

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 59.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function byteLength has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function byteLength (string, encoding) {
  if (typeof string !== 'string') string = '' + string

  var len = string.length
  if (len === 0) return 0
Severity: Minor
Found in app/Jasonette/rss.js - About 1 hr to fix

Function slice has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Buffer.prototype.slice = function slice (start, end) {
  var len = this.length
  start = ~~start
  end = end === undefined ? len : ~~end

Severity: Minor
Found in app/Jasonette/rss.js - About 1 hr to fix

Similar blocks of code found in 4 locations. Consider refactoring.
Open

Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
  if (!noAssert) checkOffset(offset, 8, this.length)
  return ieee754.read(this, offset, false, 52, 8)
}
Severity: Major
Found in app/Jasonette/rss.js and 3 other locations - About 1 hr to fix
app/Jasonette/rss.js on lines 6176..6179
app/Jasonette/rss.js on lines 6181..6184
app/Jasonette/rss.js on lines 6186..6189

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 58.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language