GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (3063)

angular-1.6.5/docs/components/lunr-0.7.2/server.js (3 issues)

1 View Code Duplication
var http = require('http'),
2
    url = require('url'),
3
    join = require('path').join,
4
    extname = require('path').extname,
5
    join = require('path').join,
0 ignored issues
show
Comprehensibility Naming Best Practice introduced by
The variable join already seems to be declared on line 3. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
6
    fs = require('fs'),
7
    port = process.argv[2] || 3000
8
9
var mime = {
10
    'html': 'text/html',
11
    'css': 'text/css',
12
    'js': 'application/javascript',
13
}
14
15
http.createServer(function(req, res){
16
  console.log('  \033[90m%s \033[36m%s\033[m', req.method, req.url)
0 ignored issues
show
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
17
18
  var pathname = url.parse(req.url).pathname,
19
      path = join(process.cwd(), pathname)
20
21
  function notFound() {
22
    res.statusCode = 404
23
    res.end("404 Not Found\n")
24
  }
25
26
  function error(err) {
27
    res.statusCode = 500
28
    res.end(err.message + "\n")
29
  }
30
31
  fs.exists(path, function(exists){
32
    if (!exists) return notFound()
33
34
    fs.stat(path, function(err, stat){
35
      if (err) return error()
36
      if (stat.isDirectory()) path = join(path, 'index.html')
37
      res.setHeader('Cache-Control', 'no-cache')
38
      res.setHeader('Content-Type', mime[path.split('.').slice(-1)] || 'application/octet-stream')
39
      fs.createReadStream(path).pipe(res)
40
    })
41
  })
42
}).listen(port)
43
44
console.log('\n  Server listening on %d\n', port)
0 ignored issues
show
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
45